package com.neusoft.neu.fy25g01.n98.service.impl;

import com.neusoft.neu.fy25g01.n98.entity.CommonResult;
import com.neusoft.neu.fy25g01.n98.entity.Sysfun;
import com.neusoft.neu.fy25g01.n98.mapper.SysfunMapper;
import com.neusoft.neu.fy25g01.n98.service.SysfunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysfunServiceImpl implements SysfunService {
    @Autowired
    private SysfunMapper sysfunMapper;


    public CommonResult<List<Sysfun>> findByRoleid(Integer roleid) {
        List<Sysfun> list = sysfunMapper.findByRoleid(roleid);
        if (list != null && list.size() != 0)
            return CommonResult.success(list);
        return CommonResult.failed();
    }
}
